import request from '@/utils/request'

// 查询Ai会话列表列表
export function listAiMessage(query) {
  return request({
    url: '/aiMessage/list',
    method: 'get',
    params: query
  })
}
// 查询Ai会话消息列表列表
export function listAiChatMessage(query) {
  return request({
    url: '/aiMessage/chat/list',
    method: 'get',
    params: query
  })
}

// 查询Ai会话列表详细
export function getAiMessage(id) {
  return request({
    url: '/aiMessage/' + id,
    method: 'get'
  })
}

// 新增Ai会话列表
export function addAiMessage(data) {
  return request({
    url: '/aiMessage',
    method: 'post',
    data: data
  })
}

// 修改Ai会话列表
export function updateAiMessage(data) {
  return request({
    url: '/aiMessage',
    method: 'put',
    data: data
  })
}

// 删除Ai会话列表
export function delAiMessage(id) {
  return request({
    url: '/aiMessage/' + id,
    method: 'delete'
  })
}

// 置为有效/置为无效
export function effectiveStatus(data) {
  return request({
    url: '/aiMessage/effectiveStatus',
    method: 'post',
    data
  })
}
